<!--COLUMN 1-->
<div class="FourColGrid_c1">
<?php 
            if($LocupApplied['Vacancy']['Avatar'])
            {
                echo '<img src="'. Router::url('/').'app/webroot/img/avatar/'.$LocupApplied['Vacancy']['Avatar'].'" width="100" height="100" alt="Locum">';
            }else
            {
                echo '<img src="'.Router::url('/').'app/webroot/img/avatar.jpg" width="100" height="100" alt="Locum">';
            }
          ?>
        <?php if($LocupApplied['Apply']['status'] == 2){
            echo '<br><br><img src="'.Router::url('/').'app/webroot/img/accepted.png" alt="Application accepted">';
         }?>
         
         <?php if($LocupApplied['Apply']['status'] == 3){
                echo '<br><br><img src="'.Router::url('/').'app/webroot/img/declined.png" alt="Application declined">';
         }?>
</div>
<!--COLUMN 1-->

<!--COLUMN 2-->
<div class="FourColGrid_c2">
<h4 class="TitleTwo"><?php echo $LocupApplied['Vacancy']['Title'];?></h4>
<b>County</b> - <?php echo $GLOBALS['Country'][$LocupApplied['Vacancy']['County_id']];?><br>
<b>Rate of pay</b> - <?php echo '£'.$LocupApplied['Vacancy']['HourlyRate'];?> per hour<br>
<b>Milage allowance after</b> - 0 - <?php echo $LocupApplied['Vacancy']['MilageAllowanceAfterMiles'];?> miles<br>
<b>Milage rate</b> - <?php echo $LocupApplied['Vacancy']['MilageRateInPence'];?> per mile<br>
<b>Other expenses</b> - <?php echo $LocupApplied['Vacancy']['OtherExpenses'];?></p>
<b>Applied hourly rate</b> - <?php echo '£'.$LocupApplied['Apply']['HourlyRate'];?></p>
<?php if($LocupApplied['Apply']['status'] == 3):?>
<br>
<br> <a class="TitleFive" style="width: 70px; float: left;" href="javascript:void(0);" id="re-apply">Re-Apply</a>
<div style="clear: both;"></div>
<?php endif;?>
</div>
<!--COLUMN 2--> 

 <!--COLUMN 3-->  
<div class="FourColGrid_c3">    
<div id="eventCalendarNoCache"></div>
<script>
$(document).ready(function() {
	$("#eventCalendarNoCache").eventCalendar({
		eventsjson: '<?php echo Router::url('/').'vacancies/getJsonApply/'.$LocupApplied['Apply']['id'] ?>',
		cacheJson: false,
		multiple: true,
		allowClick:false,
		bothColor:true,
		jumpMonth:'<?php echo $jump;?>'
	});
	$("#re-apply").click(function(){
		var id = <?php echo $LocupApplied['Apply']['id']?>;
		var router = '<?php echo Router::url('/');?>';
		$.ajax({
			type: 'POST',
			url: router + 'locums/re_apply/' + id,
			dataType: 'json',
			success: function(data){ 
				if(data.success == 'true')
				{
					window.location = router + 'locums/apply/' + data.vacancy_id;
				}
				else
				{
					jAlert('Can not re-apply this vacancy', 'Message');
				}
			},
			error: function(message){
				jAlert('Network connection errors', 'Message');
			}
		});
	});
});
</script>
<p>Calendar key</p>
<ul class="listTwo">
<li class="unavailable"> =Vacancy</li>
<li class="applicationdates"> =  Application dates</li>
</ul>
</div>
<!--COLUMN 3-->

<!--COLUMN 4-->
<div class="FourColGrid_c4">
<h6 class="TitleFive">Vacancy Search</h6>
<?php echo $this->element('search');?>
<br>
<?php echo $this->element('invite_locum');?>
</div>
<!--COLUMN 4-->